<template>
  <NewsEditor type="add"></NewsEditor>
</template>

<script>
import NewsEditor from './components/NewsEditor.vue'
export default {
  name: 'NewsAdd',
  components: {
    NewsEditor
  },
  beforeRouteLeave(to, from, next) {
    if (to.path === '/news/index') {
      // 去下级页面时打标记
      to.meta.isFlushed = true
    } else {
      this.$route.meta.isFlushed = false
    }
    next()
  }
}
</script>

<style lang="sass" scoped></style>
